package com.cq.androidtools.jetpack2

import android.content.Context
import android.util.Log
import androidx.work.Data
import androidx.work.Worker
import androidx.work.WorkerParameters

/**
 * 作者: CQ
 * 日期: 2022-02-10
 * 说明:
 */
class UploadWorker(context : Context, workerParams : WorkerParameters) : Worker(context, workerParams) {
    override fun doWork() : Result {
        Log.e("---", "我成功了 = ${inputData.getString("a")}")

        val outData = Data.Builder().putString("name", "陈").build()
        return Result.success(outData)
    }
}